home *** CD-ROM | disk | FTP | other *** search
- import java.awt.*;
- import symantec.itools.awt.util.dialog.DialogBox;
- import symantec.itools.awt.util.ProgressBar;
-
- public class ProgressDialog extends DialogBox {
-
- public ProgressDialog(Frame parent, String title, String button, boolean modal) {
- super(parent, title, modal);
-
- //{{INIT_CONTROLS
- setLayout(new FlowLayout());
- // addNotify();
- resize(insets().left + insets().right + 270, insets().top + insets().bottom + 73);
- bar = new ProgressBar();
- bar.reshape(insets().left + 52, insets().top + 25, 121, 23);
- add(bar);
- //}}
-
- if (button != null) {
- okButton = new Button(button);
- okButton.reshape(insets().left + 178, insets().top + 22, 47, 29);
- add(okButton);
- }
- }
-
- public ProgressDialog(Frame parent) {
- this(parent, true);
- }
-
- public ProgressDialog(Frame parent, boolean modal) {
- this(parent, "Progress", modal);
- }
-
- public ProgressDialog(Frame parent, String title, boolean modal) {
- this(parent, title, "Cancel", modal);
- }
-
- public void setProgress(int amount) {
- if (bar != null)
- bar.updateProgress(amount);
- }
-
- //{{DECLARE_CONTROLS
- ProgressBar bar;
- //}}
- }
-